Skip to main content

Get users that have worked on the case

Obtain the list of users who have worked in a case

You can obtain the users that have worked on a case by using the CHelper.getCaseUsers() function. This function returns an array list (ArrayList) with the ids of the users (WFUser) who have worked in a particular case.

The Case number needs to be provided as an input parameter.

The syntax of the function is:

CHelper.getCaseUsers(CaseNumber);

In a Help Desk Process many people can assist a Ticket. It is possible that a log of people who worked in a specific case is needed for analysis purposes. To obtain this log, you need to store the list of users who worked in a Ticket in the Users Log collection (shown in the data model below).

CHelper5

To obtain the list of users who worked in a Ticket, you can use the CHelper.getCaseUsers function.

Include a Bizagi expression as an activity action and make use of this function (as well as other methods) to add new records to the UsersLog collection.

CHelper7

// Get Users var CaseUsers = CHelper.getCaseUsers(Me.Case.CaseNumber);

// Go through users for (var i = 0; i < CaseUsers.Count; i++) { // Create new record in the Users Log collection var NewRow = Me.newCollectionItem("Ticket.UsersLog"); NewRow.setXPath("Users", CaseUsers[i]); }

The resultant Table in the Work Portal looks like this:

CHelper6